<template>
  <div class="home">
    <float-bubble
      v-if="refreshFlag"
      :raw-data="films"/>
  </div>

</template>

<script>
import floatBubble from "@/views/components/float_bubble/float_bubble"
import { getFilmList4Index } from "@/api/film/filmInfo";

export default {
  components:{
    floatBubble
  },
  data() {
    return {
      //电影数据
      films: [],
      refreshFlag: false,
    };
  },
  mounted() {
    this.getFilmList();
  },
  methods: {
    getFilmList(){
      this.refreshFlag = false;
      getFilmList4Index(this.queryParams).then(response => {
        this.films = response.films;
        this.refreshFlag = true;
      });
    },
  },

};
</script>


